<?php

class LikeMVC_Loader_Loader {
	
	/**
	 * @param unknown_type $file
	 */
	public static function isReadable($file) {
		//return true if this file is readable in the cwd context
		if (is_readable ( $file )) {
			return true;
		}
		
		//find it in all included path
		$paths = explode ( PATH_SEPARATOR, get_include_path () );
		foreach ( $paths as $path ) {
			$fullpath = $path."/".$file;
			if (file_exists ( $fullpath )) {
				return true;
			}
		}
		return false;
	}
}

?>